﻿$(document).ready(function () {
	//breadcrumb
	$('#crumb-box-1').addClass('crumb-box-disable');
	$('#crumb-box-2').addClass('crumb-box-enable');
	$('#crumb-box-3').addClass('crumb-box-disable');

	$('#crumb-step-1').addClass('breadcrumb-menu-disable');
	$('#crumb-step-2').addClass('breadcrumb-menu-enable');
	$('#crumb-step-3').addClass('breadcrumb-menu-disable');
	//breadcrumb end

	$('#Driver_BirthDate').datepicker();

	$('#btnNo').click(function () {
		$("#add-policy").trigger("submit");
	});

	$('#btnYes').click(function () {
		if ($("#add-policy").valid()) {
			$.post("/Information/AddAnotherDriver", $("#add-policy").serialize(), function (data) {
				if (data.message == "") {
					window.location.href = "/Information/Driver";
				}
				else {
					alert(data.message);
				}
			}, "json");
		}
	});
});